import { _request } from "@/utils/network.js";

const getBadgeListAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/badge/list", data: params });
};

const getUserBadgeInfoAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/badge/task/userDay/list", data: params });
};

const fulfilTaskAPI = async (params) => {
  return await _request({ method: "POST", url: "/app/badge/task/fulfilTask", data: params });
};

const getBadgeDetailAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/badge/getDetail/" + params });
};

const getExchangeAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/badge/getExchange", data: params });
};

const getDayEarningsAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/badge/dayEarnings/list", data: params });
};
const participatingTaskAPI = async (params) => {
  return await _request({ method: "POST", url: "/app/badge/participatingTask", data: params });
};

const getPlayletListAPI = async (params) => {
  return await _request({ method: "POST", url: "/app/playlet/page/list", data: params });
};
const getPlayClassAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/playlet/classify/list", data: params });
};

const getPlayletInfoAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/playlet/info", data: params });
};

const getInvitationPostAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/user/getInvitation", data: params });
};

const getInviteAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/user/getInvite", data: params });
};
const getInviteListAPI = async (params) => {
  return await _request({ method: "GET", url: "/app/user/invitationList", data: params });
};





export { fulfilTaskAPI, getBadgeListAPI, getBadgeDetailAPI, getUserBadgeInfoAPI, getExchangeAPI, getPlayClassAPI,getDayEarningsAPI, participatingTaskAPI, getPlayletListAPI, getPlayletInfoAPI, getInvitationPostAPI, getInviteListAPI, getInviteAPI };
